<?php require_once 'php/lib/lib.php';?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta name="description" content="" />
<meta name="keywords" content="<?php echo Config::fetch_config_content_by_name('keywords');?>" />

<link href="<?php echo BASE_URL?>img/favicon.png" rel="icon" type="image/x-icon" />
<link href="<?php echo BASE_URL?>css/index.css" rel="stylesheet" style="text/css" />
<link href="<?php echo BASE_URL?>css/search.css" rel="stylesheet" style="text/css" />

<?php if($login==1){?>
<?php require_once 'css/admin.php';?>
<link href="<?php echo BASE_URL?>js/menu/menu.css" rel="stylesheet" style="text/css" />
<link href="<?php echo BASE_URL?>css/toolbar.css" rel="stylesheet" style="text/css" />
<?php }?>

<script src="<?php echo BASE_URL?>js/jquery/jquery.min.js" type="text/javascript"></script>
<script src="<?php echo BASE_URL?>js/lib/index.js" type="text/javascript" ></script>

<?php if($login==1){?>
<script src="<?php echo BASE_URL?>js/ckfinder/ckfinder_v1.js" type="text/javascript" ></script>
<script src="<?php echo BASE_URL?>js/ckeditor/ckeditor.js" type="text/javascript"></script>
<?php require_once 'js/lib/admin.php';?>
<?php }?>
	
<title><?php echo Common::fetch_constant_by_string($page)?> - <?php echo Config::fetch_config_content_by_name('title');?></title>

</head>
<body>

<?php require_once 'php/page/_toolbar.php';?>

<div id='wrapper'> 
	<div>
		<?php if($filename!='popup.php'){?>
		<div id='header'>
			<?php require_once 'php/page/_search.php';?>
			
			<?php require_once 'php/page/_menu.php';?>
			
			<object width="980" height="190" codebase="fla/swflash.cab#version=7,0,19,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
				<param value="fla/menu_vf8.swf?button=1" name="movie">
				<param value="high" name="quality">
				<param value="never" name="allowScriptAccess">
				<param value="transparent" name="wmode">
				<param value="none" name="allowNetworking">
				<param value="false" name="menu">
				<embed width="980" height="190" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" menu="false" allowscriptaccess="never" wmode="transparent" allownetworking="none" src="fla/menu_vf8.swf?button=1">
			</object>
		</div>
		<div id='banner' style="line-height:0; font-size:0; background:url(img/header_bg.jpg) top left no-repeat">
			<object width="980" height="468" codebase="fla/swflash.cab#version=7,0,19,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
				<param value="fla/slideshow_vf8.swf" name="movie">
				<param value="high" name="quality">
				<param value="transparent" name="wmode">
				<param value="false" name="menu">
				<embed width="980" height="468" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" menu="false" wmode="transparent" quality="high" src="fla/slideshow_vf8.swf">
			</object>
		</div>
		<?php }else{?>
		<br/>
		<?php }?>
		
		<div id='container'>
			<?php 
			if($filename=='error.php')
			{ 
				if(isset($_GET['code']))
				{
					$code=$_GET['code'];
					$message=Common::fetch_message_from_code($code);
				}
			?>
				<h1>Error <?php echo $code.": ".$message;?></h1>
			<?php }else{?>
				<?php require_once 'php/page/'.$page.'.php';?>
			<?php }?>
		</div>
		<div class='clear'></div>
		<div id='footer'>
			<?php require_once 'php/page/_footer.php';?>
		</div>
	</div>
</div>

<?php require_once 'php/page/_search-script.php';?>
<?php require_once 'php/page/_analytics.php';?>
<?php Db::mysql_close();?>

</body>
</html>


